package object;

public class ObjectDemo {
    public static void main(String[] args) {
        Point p = new Point(100,200);
        System.out.println(p);
        System.out.println(p.hashCode());

        System.out.println(" "+p);

        String s1 = new String("hello");
        String s2 = new String("hello");
        System.out.println(s1.equals(s2));

        StringBuilder s3 = new StringBuilder("hello");
        StringBuilder s4 = new StringBuilder("hello");
        System.out.println(s3.equals(s4));
        System.out.println(s1.equals(s3));

        String s5 = "hello";
        String s6 = "hello";
        System.out.println(s1.equals(s5));
        System.out.println(s5==s6);

        Point p1 = new Point(100, 200);
        System.out.println(p1.equals(p));
    }
}
